#ifndef __MW_CPP_BULLET_H__
#define __MW_CPP_BULLET_H__

#include "cocos2d.h"
#include "BaseSprite.h"
USING_NS_CC;


class Bullet : public BaseSprite {
private:
    float m_velocityx;
    float m_velocityy;
    int m_power;

    int m_attackMode;
    int m_parentType;


public:
    bool m_active;
    bool m_visible;
    int m_zorder;
    int m_HP;
    Bullet();
    Bullet(int speed, const char* weapon , int attackMode);
    virtual bool init();
    virtual void update(float dt);
    virtual void hurt(int damage=1);
    virtual void destroy();
    virtual Rect collideRect();
    virtual bool isActive();
    static void preSet();
    static Bullet* create(int speed, const char* weapon, int attackMode, int zOrder, int mode);
    static Bullet* getOrCreateBullet(int bulletSpeed, const char* weaponType, int attackMode, int zOrder, int mode);

    CREATE_FUNC(Bullet);

};

#endif /* defined(__MW_CPP_BULLET_H__) */